import request from "@/utils/request";

// 获取消息接收列表
export function getList(data) {
  return request({
    url: "/api/msgCenter/mcTaskMsgReceive/getList",
    method: "post",
    data,
  });
}
// 获取消息接收
export function getInfo(id) {
  return request({
    url: `/api/msgCenter/mcTaskMsgReceive/${id}`,
    method: "get",
  });
}
// 获取消息接收详情
export function getDetail(id) {
  return request({
    url: `/api/msgCenter/mcTaskMsgReceive/detail/${id}`,
    method: "get",
  });
}
// 删除消息接收
export function Delete(mark, ids) {
  return request({
    url: `/api/msgCenter/mcTaskMsgReceive/${mark}/${ids}`,
    method: "DELETE",
  });
}
// 修改消息接收
export function Update(data) {
  return request({
    url: `/api/msgCenter/mcTaskMsgReceive/${data.id}`,
    method: "PUT",
    data,
  });
}
// 新建消息接收
export function Create(data) {
  return request({
    url: "/api/msgCenter/mcTaskMsgReceive",
    method: "post",
    data,
  });
}
// 根据消息接收重发
export function againSend(msgId, ids) {
  return request({
    url: `/api/msgCenter/mcTaskMsgReceive/againSend/${msgId}/${ids}`,
    method: "get",
  });
}
// 消息已读
export function isRead(isAll, ids) {
  return request({
    url: `/api/msgCenter/mcTaskMsgReceive/isRead/${isAll}/${ids}`,
    method: "get",
  });
}

// 消息已读统计
export function isReadCount() {
  return request({
    url: `/api/msgCenter/mcTaskMsgReceive/isReadCount`,
    method: "get",
  });
}
